<!DOCTYPE html>
<html>
<head>
	<title>修改用户信息</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<script type="text/javascript" src="__PUBLIC__/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/hdjs/hdjs.css"/>
    <script type="text/javascript" src="__PUBLIC__/hdjs/hdjs.min.js"></script>
	<link href="__PUBLIC__/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<div class="div_head">
		<span>
			<span style="float: left;">当前位置是：用户管理 >>修改用户信息</span>
			<span style="float: right; margin-right: 8px; font-weight: bold;">
				<a style="text-decoration: none;" href="{:U('add')}">【添加用户】</a>
			</span>
		</span>
	</div>
	<div class="hd-w500" style="padding:20px;margin:0 auto">
	<form name="form1" method="post" action="__SELF__">
	<input name="mg_id" type="hidden" value="{$mg.mg_id}" />
		<table class="hd-table hd-table-form hd-form">
		<thead>
        <tr>
          <th colspan="2">修改【{$mg.mg_name}】的信息</th>
        </tr>
		</thead>
    <tr>
          <td>选择所属部门：</td>
          <td><select name="mg_bm_id" class="hd-w200">
          <volist name='bm' id='b'>
      <if condition="$b['id'] eq $mg['mg_bm_id']">
              <option value="{$b.id}" selected="selected">{$b.name}</option>
      <else />
        <option value="{$b.id}">{$b.name}</option>
      </if>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>选择用户角色：</td>
          <td><select name="mg_role_id" class="hd-w200">
          <volist name='role_l' id='vo'>
			<if condition="$vo['role_id'] eq $mg['mg_role_id']">
            	<option value="{$vo.role_id}" selected="selected">{$vo.role_name}</option>
			<else />
				<option value="{$vo.role_id}">{$vo.role_name}</option>
			</if>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>选择使用的仓库：</td>
          <td><select name="mg_c_id" class="hd-w200">
            <option value="0">不指定仓库</option>
          <volist name='c_list' id='c'>
            <if condition="$c['role_id'] eq $mg['mg_c_id']">
              <option value="{$c.id}" selected="selected" >
                {$c.html}<empty name="c.name">不指定仓库<else />{$c.name}</empty>
              </option>
              <else />
              <option value="{$c.id}">
                {$c.html}<empty name="c.name">不指定仓库<else />{$c.name}</empty>
              </option>
              </if>
          </volist>
          </select></td>
        </tr>
        <tr>
          <td>用户密码：</td>
          <td><input name="mg_pwd" type="password" class="hd-w200" /></td>
        </tr>
        <tr>
          <td>确认密码：</td>
          <td><input name="c_mg_pwd" type="password" class="hd-w200" /></td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" class="hd-btn hd-btn-default" value="提交" /></td>
        </tr>
      </table>
    </form>
	</div>
<!--表单验证Start-->
<script>
    $(function () {
        $('form').validate({
            mg_pwd: {
                rule: {
                    confirm: 'c_mg_pwd'
                },
                error: {
                    confirm: '两次密码不一致'
                }
            },
        })
    })
</script>
<!--表单验证End-->
    </body>
</html>
